<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: Options</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__sntp__opts.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">Options<div class="ingroups"><a class="el" href="group__apps.html">Applications</a> &raquo; <a class="el" href="group__sntp.html">SNTP</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gafe340b98c52dedcbc041267fe13b2da6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#gafe340b98c52dedcbc041267fe13b2da6">SNTP_SET_SYSTEM_TIME</a>(sec)&#160;&#160;&#160;<a class="el" href="group__compiler__abstraction.html#ga70624a5deb8b9199406372a7f3603ecf">LWIP_UNUSED_ARG</a>(sec)</td></tr>
<tr class="separator:gafe340b98c52dedcbc041267fe13b2da6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d9dc0827f402849f5c18d44e311dbc2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga5d9dc0827f402849f5c18d44e311dbc2">SNTP_MAX_SERVERS</a>&#160;&#160;&#160;<a class="el" href="group__lwip__opts__dhcp.html#ga9d014e3f7dc9e1e7c7decd8652ba65e2">LWIP_DHCP_MAX_NTP_SERVERS</a></td></tr>
<tr class="separator:ga5d9dc0827f402849f5c18d44e311dbc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga961a61eef942ab5378cff1e3742b3ade"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga961a61eef942ab5378cff1e3742b3ade">SNTP_GET_SERVERS_FROM_DHCP</a>&#160;&#160;&#160;<a class="el" href="group__lwip__opts__dhcp.html#ga2cc18315edcd5ffc083d1256f7d22a83">LWIP_DHCP_GET_NTP_SRV</a></td></tr>
<tr class="separator:ga961a61eef942ab5378cff1e3742b3ade"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef477c145ae404d77188b26b79b6996f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#gaef477c145ae404d77188b26b79b6996f">SNTP_SERVER_DNS</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:gaef477c145ae404d77188b26b79b6996f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga25c6f9c14c17e218d110d826b09f8d91"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga25c6f9c14c17e218d110d826b09f8d91">SNTP_DEBUG</a>&#160;&#160;&#160;<a class="el" href="group__debugging__levels.html#gadab1cdc3f45939a3a5c9a3d7e04987e1">LWIP_DBG_OFF</a></td></tr>
<tr class="separator:ga25c6f9c14c17e218d110d826b09f8d91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacbee62c27f54371fc2c5259a834a0f9b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#gacbee62c27f54371fc2c5259a834a0f9b">SNTP_PORT</a>&#160;&#160;&#160;<a class="el" href="group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a79c377ce09e05cd4410a8865d41b3efb">LWIP_IANA_PORT_SNTP</a></td></tr>
<tr class="separator:gacbee62c27f54371fc2c5259a834a0f9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d4e12d90912d486e64f289d7f3ca446"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga7d4e12d90912d486e64f289d7f3ca446">SNTP_CHECK_RESPONSE</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga7d4e12d90912d486e64f289d7f3ca446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1e21781705d3549a305339fd7fca63e7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga1e21781705d3549a305339fd7fca63e7">SNTP_COMP_ROUNDTRIP</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga1e21781705d3549a305339fd7fca63e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga22017d43da7d4bf8d42e786b4ced4dfa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga22017d43da7d4bf8d42e786b4ced4dfa">SNTP_STARTUP_DELAY</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga22017d43da7d4bf8d42e786b4ced4dfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae082c2f3044d500ca5e1be1d4928de75"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#gae082c2f3044d500ca5e1be1d4928de75">SNTP_STARTUP_DELAY_FUNC</a>&#160;&#160;&#160;(<a class="el" href="group__compiler__abstraction.html#ga77370c377781ee7489e30eaf772ea05a">LWIP_RAND</a>() % 5000)</td></tr>
<tr class="separator:gae082c2f3044d500ca5e1be1d4928de75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga44cf26b9b19832d88599244711a12d08"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga44cf26b9b19832d88599244711a12d08">SNTP_RECV_TIMEOUT</a>&#160;&#160;&#160;15000</td></tr>
<tr class="separator:ga44cf26b9b19832d88599244711a12d08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9232c56443115be05a2f852eba21979c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga9232c56443115be05a2f852eba21979c">SNTP_UPDATE_DELAY</a>&#160;&#160;&#160;3600000</td></tr>
<tr class="separator:ga9232c56443115be05a2f852eba21979c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab0ea385479a5c5c8c173f165ded2fb63"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#gab0ea385479a5c5c8c173f165ded2fb63">SNTP_GET_SYSTEM_TIME</a>(sec,  us)&#160;&#160;&#160;do { (sec) = 0; (us) = 0; } while(0)</td></tr>
<tr class="separator:gab0ea385479a5c5c8c173f165ded2fb63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga86d651d8eb07687208308deef95a23ba"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga86d651d8eb07687208308deef95a23ba">SNTP_RETRY_TIMEOUT</a>&#160;&#160;&#160;<a class="el" href="group__sntp__opts.html#ga44cf26b9b19832d88599244711a12d08">SNTP_RECV_TIMEOUT</a></td></tr>
<tr class="separator:ga86d651d8eb07687208308deef95a23ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafde10b3ed7cb4bb2cd2c4daa389db699"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#gafde10b3ed7cb4bb2cd2c4daa389db699">SNTP_RETRY_TIMEOUT_MAX</a>&#160;&#160;&#160;(<a class="el" href="group__sntp__opts.html#ga86d651d8eb07687208308deef95a23ba">SNTP_RETRY_TIMEOUT</a> * 10)</td></tr>
<tr class="separator:gafde10b3ed7cb4bb2cd2c4daa389db699"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafdb7e98f608cc429188d7dac356614c2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#gafdb7e98f608cc429188d7dac356614c2">SNTP_RETRY_TIMEOUT_EXP</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:gafdb7e98f608cc429188d7dac356614c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5782f21ef24ebddd5ba2ce9a889094e3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__sntp__opts.html#ga5782f21ef24ebddd5ba2ce9a889094e3">SNTP_MONITOR_SERVER_REACHABILITY</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga5782f21ef24ebddd5ba2ce9a889094e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga7d4e12d90912d486e64f289d7f3ca446"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7d4e12d90912d486e64f289d7f3ca446">&#9670;&nbsp;</a></span>SNTP_CHECK_RESPONSE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_CHECK_RESPONSE&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sanity check: Define this to</p><ul>
<li>0 to turn off sanity checks (default; smaller code)</li>
<li>&gt;= 1 to check address and port of the response packet to ensure the response comes from the server we sent the request to.</li>
<li>&gt;= 2 to check returned Originate Timestamp against Transmit Timestamp sent to the server (to ensure response to older request).</li>
<li>&gt;= 3 </li>
</ul>

</div>
</div>
<a id="ga1e21781705d3549a305339fd7fca63e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1e21781705d3549a305339fd7fca63e7">&#9670;&nbsp;</a></span>SNTP_COMP_ROUNDTRIP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_COMP_ROUNDTRIP&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable round-trip delay compensation. Compensate for the round-trip delay by calculating the clock offset from the originate, receive, transmit and destination timestamps, as per RFC.</p>
<p>The calculation requires compiler support for 64-bit integers. Also, either SNTP_SET_SYSTEM_TIME_US or SNTP_SET_SYSTEM_TIME_NTP has to be implemented for setting the system clock with sub-second precision. Likewise, either SNTP_GET_SYSTEM_TIME or SNTP_GET_SYSTEM_TIME_NTP needs to be implemented with sub-second precision.</p>
<p>Although not strictly required, it makes sense to combine this option with SNTP_CHECK_RESPONSE &gt;= 2 for sanity-checking of the received timestamps. Also, in order for the round-trip calculation to work, the difference between the local clock and the NTP server clock must not be larger than about 34 years. If that limit is exceeded, the implementation will fall back to setting the clock without compensation. In order to ensure that the local clock is always within the permitted range for compensation, even at first try, it may be necessary to store at least the current year in non-volatile memory. </p>

</div>
</div>
<a id="ga25c6f9c14c17e218d110d826b09f8d91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga25c6f9c14c17e218d110d826b09f8d91">&#9670;&nbsp;</a></span>SNTP_DEBUG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_DEBUG&#160;&#160;&#160;<a class="el" href="group__debugging__levels.html#gadab1cdc3f45939a3a5c9a3d7e04987e1">LWIP_DBG_OFF</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SNTP_DEBUG: Enable debugging for SNTP. </p>

</div>
</div>
<a id="ga961a61eef942ab5378cff1e3742b3ade"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga961a61eef942ab5378cff1e3742b3ade">&#9670;&nbsp;</a></span>SNTP_GET_SERVERS_FROM_DHCP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_GET_SERVERS_FROM_DHCP&#160;&#160;&#160;<a class="el" href="group__lwip__opts__dhcp.html#ga2cc18315edcd5ffc083d1256f7d22a83">LWIP_DHCP_GET_NTP_SRV</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set this to 1 to implement the callback function called by dhcp when NTP servers are received. </p>

</div>
</div>
<a id="gab0ea385479a5c5c8c173f165ded2fb63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab0ea385479a5c5c8c173f165ded2fb63">&#9670;&nbsp;</a></span>SNTP_GET_SYSTEM_TIME</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_GET_SYSTEM_TIME</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sec, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">us&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;do { (sec) = 0; (us) = 0; } while(0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SNTP macro to get system time, used with SNTP_CHECK_RESPONSE &gt;= 2 to send in request and compare in response. Also used for round-trip delay compensation if SNTP_COMP_ROUNDTRIP != 0. Alternatively, define SNTP_GET_SYSTEM_TIME_NTP(sec, frac) in order to work with native NTP timestamps instead. </p>

</div>
</div>
<a id="ga5d9dc0827f402849f5c18d44e311dbc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5d9dc0827f402849f5c18d44e311dbc2">&#9670;&nbsp;</a></span>SNTP_MAX_SERVERS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_MAX_SERVERS&#160;&#160;&#160;<a class="el" href="group__lwip__opts__dhcp.html#ga9d014e3f7dc9e1e7c7decd8652ba65e2">LWIP_DHCP_MAX_NTP_SERVERS</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The maximum number of SNTP servers that can be set </p>

</div>
</div>
<a id="ga5782f21ef24ebddd5ba2ce9a889094e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5782f21ef24ebddd5ba2ce9a889094e3">&#9670;&nbsp;</a></span>SNTP_MONITOR_SERVER_REACHABILITY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_MONITOR_SERVER_REACHABILITY&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Keep a reachability shift register per server Default is on to conform to RFC. </p>

</div>
</div>
<a id="gacbee62c27f54371fc2c5259a834a0f9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacbee62c27f54371fc2c5259a834a0f9b">&#9670;&nbsp;</a></span>SNTP_PORT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_PORT&#160;&#160;&#160;<a class="el" href="group__iana.html#ggac9396d90585e49e9a287179bf5aa9ba0a79c377ce09e05cd4410a8865d41b3efb">LWIP_IANA_PORT_SNTP</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SNTP server port </p>

</div>
</div>
<a id="ga44cf26b9b19832d88599244711a12d08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga44cf26b9b19832d88599244711a12d08">&#9670;&nbsp;</a></span>SNTP_RECV_TIMEOUT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_RECV_TIMEOUT&#160;&#160;&#160;15000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SNTP receive timeout - in milliseconds Also used as retry timeout - this shouldn't be too low. Default is 15 seconds. Must not be beolw 15 seconds by specification (i.e. 15000) </p>

</div>
</div>
<a id="ga86d651d8eb07687208308deef95a23ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga86d651d8eb07687208308deef95a23ba">&#9670;&nbsp;</a></span>SNTP_RETRY_TIMEOUT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_RETRY_TIMEOUT&#160;&#160;&#160;<a class="el" href="group__sntp__opts.html#ga44cf26b9b19832d88599244711a12d08">SNTP_RECV_TIMEOUT</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Default retry timeout (in milliseconds) if the response received is invalid. This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached. </p>

</div>
</div>
<a id="gafdb7e98f608cc429188d7dac356614c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafdb7e98f608cc429188d7dac356614c2">&#9670;&nbsp;</a></span>SNTP_RETRY_TIMEOUT_EXP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_RETRY_TIMEOUT_EXP&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Increase retry timeout with every retry sent Default is on to conform to RFC. </p>

</div>
</div>
<a id="gafde10b3ed7cb4bb2cd2c4daa389db699"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafde10b3ed7cb4bb2cd2c4daa389db699">&#9670;&nbsp;</a></span>SNTP_RETRY_TIMEOUT_MAX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_RETRY_TIMEOUT_MAX&#160;&#160;&#160;(<a class="el" href="group__sntp__opts.html#ga86d651d8eb07687208308deef95a23ba">SNTP_RETRY_TIMEOUT</a> * 10)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum retry timeout (in milliseconds). </p>

</div>
</div>
<a id="gaef477c145ae404d77188b26b79b6996f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef477c145ae404d77188b26b79b6996f">&#9670;&nbsp;</a></span>SNTP_SERVER_DNS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_SERVER_DNS&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set this to 1 to support DNS names (or IP address strings) to set sntp servers One server address/name can be defined as default if SNTP_SERVER_DNS == 1: #define SNTP_SERVER_ADDRESS "pool.ntp.org" </p>

</div>
</div>
<a id="gafe340b98c52dedcbc041267fe13b2da6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafe340b98c52dedcbc041267fe13b2da6">&#9670;&nbsp;</a></span>SNTP_SET_SYSTEM_TIME</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_SET_SYSTEM_TIME</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sec</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="group__compiler__abstraction.html#ga70624a5deb8b9199406372a7f3603ecf">LWIP_UNUSED_ARG</a>(sec)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SNTP macro to change system time in seconds Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one if you need the additional precision. Alternatively, define SNTP_SET_SYSTEM_TIME_NTP(sec, frac) in order to work with native NTP timestamps instead. </p>

</div>
</div>
<a id="ga22017d43da7d4bf8d42e786b4ced4dfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga22017d43da7d4bf8d42e786b4ced4dfa">&#9670;&nbsp;</a></span>SNTP_STARTUP_DELAY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_STARTUP_DELAY&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>According to the RFC, this shall be a random delay between 1 and 5 minutes (in milliseconds) to prevent load peaks. This can be defined to a random generation function, which must return the delay in milliseconds as u32_t. Turned off by default. </p>

</div>
</div>
<a id="gae082c2f3044d500ca5e1be1d4928de75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae082c2f3044d500ca5e1be1d4928de75">&#9670;&nbsp;</a></span>SNTP_STARTUP_DELAY_FUNC</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_STARTUP_DELAY_FUNC&#160;&#160;&#160;(<a class="el" href="group__compiler__abstraction.html#ga77370c377781ee7489e30eaf772ea05a">LWIP_RAND</a>() % 5000)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If you want the startup delay to be a function, define this to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1. </p>

</div>
</div>
<a id="ga9232c56443115be05a2f852eba21979c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9232c56443115be05a2f852eba21979c">&#9670;&nbsp;</a></span>SNTP_UPDATE_DELAY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SNTP_UPDATE_DELAY&#160;&#160;&#160;3600000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SNTP update delay - in milliseconds Default is 1 hour. Must not be beolw 60 seconds by specification (i.e. 60000) </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
